﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using BLL;
namespace 健身房管理
{
    public partial class UsersHome : UserControl
    {
        public int id = 0;
        UserHomeBLL ubl = new UserHomeBLL();
        public UsersHome()
        {
            InitializeComponent();
        }

        private void addUserControl(UserControl uc)
        {
            panel1.Controls.Clear();  //清空显示页面
            uc.Dock = DockStyle.Fill;         //当前要添加的页面 填充满
            uc.BringToFront();
            panel1.Controls.Add(uc);
        }

        private void pictureBox1_Click_1(object sender, EventArgs e)
        {
            UserInfo uinfo = new UserInfo();
            uinfo.random1 = id;
            addUserControl(uinfo);
        }

        private void UsersHome_Load(object sender, EventArgs e)
        {

            jiaz();
        }

        private void panel1_Paint(object sender, PaintEventArgs e)
        {

        }
        public void jiaz()
        {
           
            DataTable dt = ubl.xiansxiaof(id);
            guna2CircleProgressBar1.Value=int.Parse( dt.Rows[0]["carnum"].ToString());
            guna2CircleProgressBar2.Value = int.Parse(dt.Rows[0]["carnum"].ToString()) * 20;
            
        }
    }
}
